package com.xncoding.easyexcei.listener;

import cn.idev.excel.context.AnalysisContext;
import cn.idev.excel.read.listener.ReadListener;
import com.alibaba.fastjson2.JSON;
import com.xncoding.easyexcei.model.DemoData;
import com.xncoding.easyexcei.model.IndexOrNameData;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class IndexOrNameDataListener implements ReadListener<IndexOrNameData> {

    @Override
    public void invoke(IndexOrNameData data, AnalysisContext context) {
        log.info("IndexOrNameDataListener解析到一条数据:{}", JSON.toJSONString(data));
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext context) {
        log.info("IndexOrNameDataListener所有数据解析完成！");
    }
}